package com.lapula.crazyface.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;

public class BaseActivity extends Activity {

	private Handler toastHandler = new Handler(){

		@Override
		public void handleMessage(Message msg) {
			String obj = (String) msg.obj;
			Toast.makeText(BaseActivity.this, obj, Toast.LENGTH_SHORT).show();
		}
		
	};

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	protected void onPause() {
		super.onPause();
	}
	
	public void toast(String str) {
		Message msg = new Message();
		msg.obj = str;
		toastHandler.sendMessage(msg);
	}
}
